package com.qf.j2112.service;

import com.github.pagehelper.PageInfo;
import com.qf.j2112.entity.SysOrder;
import com.qf.j2112.vo.AjaxResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@FeignClient(value="ORDER-SERVICE")
public interface OrdersFeign {
    @RequestMapping(value = "/orderlist",method = RequestMethod.GET)
    public AjaxResult list();
    @RequestMapping(value = "updateStatus",method = RequestMethod.PUT)
    public AjaxResult updateOrder( @RequestParam(value = "orderId") Integer orderId,
                                   @RequestParam(value = "statusId") Integer statusId);

    @RequestMapping(value = "/orderlist3",method = RequestMethod.GET)
    public PageInfo listorder3(@RequestParam(value = "size") Integer size,
                               @RequestParam(value = "page") Integer page,
                               @RequestParam(value = "status1") Integer status1,
                               @RequestParam(value = "status2") Integer status2);

    @RequestMapping(value = "/orderlist2",method = RequestMethod.GET)
    public List<SysOrder> listorder2(@RequestParam(value = "size") Integer size,
                                     @RequestParam(value = "page") Integer page,
                                     @RequestParam(value = "status1") Integer status1,
                                     @RequestParam(value = "status2") Integer status2);

}
